From 6dc8df55eafe46f44218eaabb701ec51d1eeeed3 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 18 Mar 2008 11:02:00 +0000 Subject: [PATCH] Each TAP/TUN device name for a HVM guest includes its domain ID. The TAP/TUN devices are used for connection to a HVM domain, but there is no relationship between each name of the devices and its domain ID. This patch assigns a HVM domain ID to each TAP/TUN device name. Signed-off-by: MIYAJIMA Mitsuharu --- tools/python/xen/xend/image.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 55d2a34d8c..e319a6aa1e 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -580,7 +580,8 @@ class HVMImageHandler(ImageHandler): ret.append("nic,vlan=%d,macaddr=%s,model=%s" % (nics, mac, model)) ret.append("-net") - ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge)) + ret.append("tap,vlan=%d,ifname=tap%d.%d,bridge=%s" % + (nics, self.vm.getDomid(), nics-1, bridge)) return ret -- 2.30.2